package com.cby.operation.anti.bean

import android.os.Parcel
import android.os.Parcelable

/**
 * Description:CloseButtonBean
 *
 * @author 陈宝阳
 * @create 2020/1/14 17: 08
 */
data class CloseButtonBean(

    var show: Boolean,
    var func: String?

    ) : Parcelable {

    constructor(parcel: Parcel) : this(
        parcel.readByte() != 0.toByte(),
        parcel.readString()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeByte(if (show) 1 else 0)
        parcel.writeString(func)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<CloseButtonBean> {
        override fun createFromParcel(parcel: Parcel): CloseButtonBean {
            return CloseButtonBean(parcel)
        }

        override fun newArray(size: Int): Array<CloseButtonBean?> {
            return arrayOfNulls(size)
        }
    }

}